package com.lemontree.web.controller.System;

import com.lemontree.core.shiro.token.TokenManager;
import com.lemontree.web.controller.BaseController;
import com.lemontree.web.entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

/**
 * Created by YLBG-YCY-1325 on 2017/2/18.
 */
@Controller
@RequestMapping("/index.htm")
public class IndexController extends BaseController {

    /**
     * 主页面跳转
     * @return 页面地址
     */
    @RequestMapping(method = RequestMethod.GET)
    public ModelAndView gotoIndex(ModelMap map) {
        User user = TokenManager.getToken();
        map.put("user", user);
        return new ModelAndView("index");
    }

}
